package server;

import model.Message;
import model.User;

public class Conversation {
	private User one, two;
	private ServerController controller;
	
	public Conversation(User one, User two, ServerController controller) {
		this.one=one;
		this.two=two;
		this.controller=controller;
	}
	public boolean containsUser(User user) {
		return one.equals(user) || two.equals(user);
	}
	public void sendMessage(Message message) {
		controller.sendMessageTo(message, one);
		controller.sendMessageTo(message, two);
	}
}
